const entries = new Map([
  ['foo', 'bar'],
  ['baz', 42]
])
console.log(entries);
console.log(Object.fromEntries(entries));